<?php
	$id=$_GET['idtin'];
	$r="select Luotxem from tintuc where IDtin={$id} and Anhienthi=1";
	$q=mysqli_query($dbc,$r);
	$f=mysqli_fetch_array($q);
	$dem=$f['Luotxem'];
	$dem=$dem+1;
	$r="update tintuc set Luotxem={$dem} where IDtin={$id}";
	$q=mysqli_query($dbc,$r) or die(mysqli_error($dbc));
?>
<div style="width:470px;height:auto">
         <?php
	  	$r="select IDtin,Tieude,Noidung,Tomtat from tintuc where IDtin={$id} and Anhienthi=1";
		$q=mysqli_query($dbc,$r);
		while($f=mysqli_fetch_array($q)){
	  ?>
      <a style="display:block;border-bottom:thin solid #0F3" href="dn.php?idtin=<?php echo $f['IDtin'] ?>">
      <figure style="width:650px;height:120px" >
      
      <div style="margin-left:5px;color:#000;width:400px;float:right;">
      <div class="tieude" style="font-size:14px;float:left;width:100%">
      	<?php echo $f['Tieude'] ?>
      </div>
      <div class="tomtat" style="margin-top:10px;font-size:12px;float:left;width:100%">
      	<?php echo $f['Tomtat'] ?>
      </div>
      <img width="220px" height="190px" style="float:left" src="<?php echo $f['anh1'] ?>"/>
      </div>
      <div class="tomtat" style="margin-top:10px;font-size:12px;float:left;width:100%">
	  <?php echo $f['Noidung'] ?>
      </div>
      </figure></a>
<?php } ?>
</div>